package com.sskj.community.ui.activity;

import com.lzy.okgo.model.Response;
import com.sskj.common.base.HttpData;
import com.sskj.community.presenter.BasePresenter;
import com.sskj.lib.bean.ArticleBean;
import com.sskj.lib.http.JsonCallBack;


/**
 * @author Hey
 * Create at  2019/07/08
 */
class PublishArticlePresenter extends BasePresenter<PublishArticleActivity> {

    public void getArticleData(String id) {
        httpService.getArticleData(id)
                .tag(this)
                .execute(new JsonCallBack<HttpData<ArticleBean>>() {
                    @Override
                    public void onSuccess(Response<HttpData<ArticleBean>> response) {
                        ArticleBean data = response.body().getData();
                        mView.getArticleSuccess(data);
                    }
                });
    }
}
